/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GiaodienAdmin.java
 *
 * Created on Dec 8, 2012, 2:52:28 AM
 */
package doancnpm;
import com.toedter.calendar.IDateEditor;
import connect.connect;
import java.awt.Container;
import java.awt.Rectangle;
import java.sql.Connection;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.Calendar;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import java.sql.ResultSet;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Vector;


public class GiaodienAdmin extends javax.swing.JFrame {

    DefaultTableModel tblmodelthanhvien;
    ResultSet rsthanhvien1;
    ResultSet rsthanhvien2;
    ResultSet rsdungcu;
    ResultSet rsnoidungtap;
    ResultSet rslop;
    ResultSet rsnguoihuongdan;
    ResultSet rs;
    ResultSet rs1;
    DefaultTableModel tblmodeldungcu;
    DefaultTableModel tblmodelnoidungtap;
    DefaultTableModel tblmodellop;
    DefaultTableModel tblmodelDkLop;
    DefaultTableModel tblmodelDkThanhvien;
    DefaultTableModel tblmodelnguoihuongdan;
    DefaultTableModel tblmodelLop_thanhvien;
    String DKmalop = null;
    String DKmathanhvien = null;
    
    public GiaodienAdmin() {
        initComponents();
        tblmodelthanhvien = (DefaultTableModel) tabthanhvien.getModel();
        tblmodelDkThanhvien = (DefaultTableModel) tabDkThanhvien.getModel();
        tblmodelDkLop = (DefaultTableModel) tabDkLop.getModel();
        tblmodeldungcu = (DefaultTableModel) tabdungcu.getModel();
        tblmodelnoidungtap = (DefaultTableModel) jTable2.getModel();
        tblmodellop = (DefaultTableModel) jTable3.getModel();
        tblmodelnguoihuongdan = (DefaultTableModel) tabNguoihuongdan.getModel();
        tblmodelLop_thanhvien = (DefaultTableModel) tabLop_Thanhvien.getModel();
        loadthanhvien();
        loadnoidungtap();
        loadlop();
        loaddungcu();
        loaddangky();
        loaddoanhthu();
        try {
            loadnguoihuongdan();
        } catch (SQLException ex) {
            Logger.getLogger(GiaodienAdmin.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

public void loadthanhvien(){
    connect obj = new connect();
    Connection con = obj.connect();
    
    btnsuathanhvien.setEnabled(false);
    btnxoathanhvien.setEnabled(false);
    
    while(tblmodelthanhvien.getRowCount()>0)
    {
        tblmodelthanhvien.removeRow(0);
    }
    String sql = "EXEC sp_Thanhvien_GetByAll";
    try
    {
        rsthanhvien1 = obj.executeSQL(sql);
        while(rsthanhvien1.next())
        {
            Vector v =new Vector();
            v.addElement(rsthanhvien1.getString("Mathanhvien"));
            v.addElement(rsthanhvien1.getString("Tenthanhvien"));
            v.addElement(rsthanhvien1.getString("Gioitinh"));
            v.addElement(rsthanhvien1.getString("Ngaysinh"));
            v.addElement(rsthanhvien1.getString("Dienthoai"));
            v.addElement(rsthanhvien1.getString("Diachi"));
            tblmodelthanhvien.addRow(v);
        }
       tabthanhvien.setModel(tblmodelthanhvien);
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}
   
public void loadnoidungtap(){
    connect obj = new connect();
    Connection con = obj.connect();
    
    btnSuanoidung.setEnabled(false);
    btnXoanoidung.setEnabled(false);
    
    while(cbbNDTtendungcu.getItemCount()>0){
            cbbNDTtendungcu.removeAllItems();
        }
    try{
        rs=obj.executeSQL("select Tendungcu from Dungcu");
        while(rs.next()){
            cbbNDTtendungcu.addItem(rs.getString("Tendungcu"));
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    rs = null;
    
    while(tblmodelnoidungtap.getRowCount()>0)
    {
        tblmodelnoidungtap.removeRow(0);
    }
    String sql = "EXEC sp_Noidungtap_GetByAll";
   
    try
    {
        rsnoidungtap = obj.executeSQL(sql);
        while(rsnoidungtap.next())
        {
            Vector v =new Vector();
            v.addElement(rsnoidungtap.getString("Manoidung"));
            v.addElement(rsnoidungtap.getString("Tennoidung"));
            v.addElement(rsnoidungtap.getString("Mota"));
            String madc = rsnoidungtap.getString("Madungcu");
            String sql2 = "select Tendungcu from Dungcu where Madungcu = '"+madc+"'";
            try{
                rs = obj.executeSQL(sql2);
                while(rs.next())
                {
                    v.addElement(rs.getString("Tendungcu"));
                }
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
            v.addElement(rsnoidungtap.getString("Chiphi"));
            tblmodelnoidungtap.addRow(v);
        }
       jTable2.setModel(tblmodelnoidungtap);
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}

public void loadlop(){
    connect obj = new connect();
    Connection con = obj.connect();
    
    btnSualop.setEnabled(false);
    btnXoalop.setEnabled(false);
    
    while(cbbNguoihuongdan.getItemCount()>0){
            cbbNguoihuongdan.removeAllItems();
        }
        try{
        rslop = obj.executeSQL("select Tennguoihuongdan from Nguoihuongdan");
        while(rslop.next()){
            cbbNguoihuongdan.addItem(rslop.getString("Tennguoihuongdan"));
        }
        }
        catch(SQLException e)
        {
            e.printStackTrace();
        }
    
    while(tblmodellop.getRowCount()>0)
    {
        tblmodellop.removeRow(0);
    }
    String sql = "EXEC sp_Lop_GetByTop";
   
    try
    {
        rslop = obj.executeSQL(sql);
        while(rslop.next())
        {
            Vector v =new Vector();
            v.addElement(rslop.getString("Malop"));
            v.addElement(rslop.getString("Tenlop"));
            v.addElement(rslop.getString("Khunggio"));
            String manhd = rslop.getString("Manguoihuongdan");
            try{
                rs = obj.executeSQL("select Tennguoihuongdan from Nguoihuongdan where Manguoihuongdan = '"+manhd+"'");
                while(rs.next())
                {
                    v.addElement(rs.getString("Tennguoihuongdan"));
                }
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
            v.addElement(rslop.getString("Ngaybatdau"));
            v.addElement(rslop.getString("Ngayketthuc"));
            tblmodellop.addRow(v);
        }
       jTable3.setModel(tblmodellop);
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel2 = new javax.swing.JPanel();
        jLabel18 = new javax.swing.JLabel();
        cbbNguoihuongdan = new javax.swing.JComboBox();
        jScrollPane5 = new javax.swing.JScrollPane();
        tabLop_Thanhvien = new javax.swing.JTable();
        btnThemlop = new javax.swing.JButton();
        jLabel21 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        btnSualop = new javax.swing.JButton();
        btnXoalop = new javax.swing.JButton();
        txtMalop = new javax.swing.JTextField();
        txtTenlop = new javax.swing.JTextField();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTable3 = new javax.swing.JTable();
        txtKhunggio = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jLabel44 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        cldLopNgaybatdau = new com.toedter.calendar.JDateChooser();
        cldLopNgayketthuc = new com.toedter.calendar.JDateChooser();
        jLabel46 = new javax.swing.JLabel();
        txtdoanhthu = new javax.swing.JTextField();
        jLabel47 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        tabdungcu = new javax.swing.JTable();
        jLabel22 = new javax.swing.JLabel();
        txtdcMa = new javax.swing.JTextField();
        txtdcNsx = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        txtdcTen = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        txtdcGia = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        txtdcChucnang = new javax.swing.JTextField();
        btndcThem = new javax.swing.JButton();
        btndcXoa = new javax.swing.JButton();
        jLabel29 = new javax.swing.JLabel();
        txttimkiemdungcu = new javax.swing.JTextField();
        btntimkiemdungcu = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jLabel13 = new javax.swing.JLabel();
        btnXoanoidung = new javax.swing.JButton();
        btnThemnoidung = new javax.swing.JButton();
        txtChiphi = new javax.swing.JTextField();
        btnSuanoidung = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        txtMota = new javax.swing.JTextField();
        txtTennoidung = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        txtManoidung = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        cbbNDTtendungcu = new javax.swing.JComboBox();
        jPanel6 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane6 = new javax.swing.JScrollPane();
        tabDkLop = new javax.swing.JTable();
        jScrollPane7 = new javax.swing.JScrollPane();
        tabDkThanhvien = new javax.swing.JTable();
        jLabel16 = new javax.swing.JLabel();
        btnDkTimkiem = new javax.swing.JButton();
        txtDkTimkiemlop = new javax.swing.JTextField();
        jLabel30 = new javax.swing.JLabel();
        txtDkTimkiemthnahvien = new javax.swing.JTextField();
        btnDkTimkiemthanhvien = new javax.swing.JButton();
        btnDkThanhvien = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tabthanhvien = new javax.swing.JTable();
        jLabel3 = new javax.swing.JLabel();
        txtmathanhvien = new javax.swing.JTextField();
        txttenthanhvien = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txtsdt = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        txttendangnhap = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        txtmatkhau = new javax.swing.JPasswordField();
        txtlaimatkhau = new javax.swing.JPasswordField();
        btnthemthanhvien = new javax.swing.JButton();
        btnsuathanhvien = new javax.swing.JButton();
        btnxoathanhvien = new javax.swing.JButton();
        jLabel11 = new javax.swing.JLabel();
        txtdiachi = new javax.swing.JTextField();
        cbbgioitinh = new javax.swing.JComboBox();
        cldngaysinh = new com.toedter.calendar.JDateChooser();
        jLabel27 = new javax.swing.JLabel();
        cbbcapdo = new javax.swing.JComboBox();
        jLabel28 = new javax.swing.JLabel();
        txttimkiem = new javax.swing.JTextField();
        tbntimkiem = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jScrollPane8 = new javax.swing.JScrollPane();
        tabNguoihuongdan = new javax.swing.JTable();
        jLabel31 = new javax.swing.JLabel();
        txtNHDma = new javax.swing.JTextField();
        txtNHDten = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        txtNHDsdt = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        txtNHDtendn = new javax.swing.JTextField();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        txtNHDmatkhau = new javax.swing.JPasswordField();
        txtNHDlaimatkhau = new javax.swing.JPasswordField();
        btnNHDthem = new javax.swing.JButton();
        btnNHDsua = new javax.swing.JButton();
        btnNHDxoa = new javax.swing.JButton();
        jLabel39 = new javax.swing.JLabel();
        txtNHDdiachi = new javax.swing.JTextField();
        cbbNHDgioitinh = new javax.swing.JComboBox();
        cldNHDngaysinh = new com.toedter.calendar.JDateChooser();
        jLabel40 = new javax.swing.JLabel();
        cbbNHDcapdo = new javax.swing.JComboBox();
        jLabel41 = new javax.swing.JLabel();
        txtNHDtimkiem = new javax.swing.JTextField();
        tbnNHDtimkiem = new javax.swing.JButton();
        jLabel42 = new javax.swing.JLabel();
        txtNHDtrinhdo = new javax.swing.JTextField();
        jLabel43 = new javax.swing.JLabel();
        cbbNHDnoidung = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jTabbedPane1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTabbedPane1MouseClicked(evt);
            }
        });

        jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255)));

        jLabel18.setText("Mã Lớp");

        cbbNguoihuongdan.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Chọn người hướng dẫn", " " }));
        cbbNguoihuongdan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbbNguoihuongdanActionPerformed(evt);
            }
        });

        tabLop_Thanhvien.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Mã thành viên", "Tên thành viên", "Ngày sinh", "Giới tính"
            }
        ));
        jScrollPane5.setViewportView(tabLop_Thanhvien);

        btnThemlop.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        btnThemlop.setForeground(new java.awt.Color(0, 0, 255));
        btnThemlop.setText("Thêm Lớp");
        btnThemlop.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThemlopActionPerformed(evt);
            }
        });

        jLabel21.setText("Người hướng dẫn");

        jLabel20.setText("Khung giờ");

        jLabel19.setText("Tên Lớp");

        btnSualop.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        btnSualop.setForeground(new java.awt.Color(0, 0, 255));
        btnSualop.setText("Sửa Lớp");
        btnSualop.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSualopActionPerformed(evt);
            }
        });

        btnXoalop.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        btnXoalop.setForeground(new java.awt.Color(0, 0, 255));
        btnXoalop.setText("Xóa Lớp");
        btnXoalop.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnXoalopActionPerformed(evt);
            }
        });

        jTable3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Mã Lớp", "Tên Lớp", "Khung giờ", "Người hướng dẫn", "Ngày bắt đầu", "Ngày kết thúc"
            }
        ));
        jTable3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable3MouseClicked(evt);
            }
        });
        jScrollPane3.setViewportView(jTable3);

        jButton1.setFont(new java.awt.Font("Tahoma", 0, 12));
        jButton1.setForeground(new java.awt.Color(0, 0, 255));
        jButton1.setText("Xóa thành viên");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jLabel44.setText("Ngày bắt đâu");

        jLabel45.setText("Ngày kết thúc");

        jLabel46.setText("Tổng doanh thu tháng:");

        txtdoanhthu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtdoanhthuActionPerformed(evt);
            }
        });

        jLabel47.setText("VND");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 436, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jLabel46)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtdoanhthu, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel47)
                                .addGap(25, 25, 25)))
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 408, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel19)
                            .addComponent(jLabel18))
                        .addGap(36, 36, 36)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtMalop, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(txtTenlop, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE))
                        .addGap(73, 73, 73)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel21)
                            .addComponent(jLabel20))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(cbbNguoihuongdan, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtKhunggio, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE))
                        .addGap(67, 67, 67)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel45)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(cldLopNgayketthuc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabel44)
                                .addGap(10, 10, 10)
                                .addComponent(cldLopNgaybatdau, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(20, Short.MAX_VALUE))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addComponent(btnThemlop, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSualop, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnXoalop, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 193, Short.MAX_VALUE)
                .addComponent(jButton1)
                .addGap(179, 179, 179))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel18)
                        .addComponent(txtMalop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(txtKhunggio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel20)
                        .addComponent(jLabel44))
                    .addComponent(cldLopNgaybatdau, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(24, 24, 24)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel19)
                        .addComponent(txtTenlop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel21)
                        .addComponent(cbbNguoihuongdan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel45))
                    .addComponent(cldLopNgayketthuc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(49, 49, 49)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel46)
                            .addComponent(txtdoanhthu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel47))
                        .addGap(32, 32, 32)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnThemlop)
                            .addComponent(btnSualop, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnXoalop, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(21, 21, 21))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jButton1)
                        .addGap(39, 39, 39)))
                .addGap(35, 35, 35))
        );

        jTabbedPane1.addTab("Quản lý lớp học", jPanel2);

        tabdungcu.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Mã dụng cụ", "Tên dụng cụ", "Nơi sản xuất", "Giá", "Chức năng"
            }
        ));
        tabdungcu.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tabdungcuMouseClicked(evt);
            }
        });
        jScrollPane4.setViewportView(tabdungcu);

        jLabel22.setText("Mã dụng cụ:");

        jLabel23.setText("Tên dụng cụ:");

        jLabel24.setText("Nơi sản xuất:");

        jLabel25.setText("Giá:");

        jLabel26.setText("Chức năng:");

        btndcThem.setFont(new java.awt.Font("Tahoma", 0, 14));
        btndcThem.setForeground(new java.awt.Color(0, 0, 204));
        btndcThem.setText("Thêm dụng cụ");
        btndcThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btndcThemActionPerformed(evt);
            }
        });

        btndcXoa.setFont(new java.awt.Font("Tahoma", 0, 14));
        btndcXoa.setForeground(new java.awt.Color(0, 0, 204));
        btndcXoa.setText("Xóa dụng cụ");
        btndcXoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btndcXoaActionPerformed(evt);
            }
        });

        jLabel29.setText("Nhập tên dụng cụ");

        txttimkiemdungcu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txttimkiemdungcuActionPerformed(evt);
            }
        });

        btntimkiemdungcu.setForeground(new java.awt.Color(0, 0, 204));
        btntimkiemdungcu.setText("Tìm kiếm");
        btntimkiemdungcu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btntimkiemdungcuActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel22)
                    .addComponent(jLabel26)
                    .addComponent(jLabel23)
                    .addComponent(jLabel24)
                    .addComponent(jLabel25))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(txtdcNsx)
                        .addComponent(txtdcTen)
                        .addComponent(txtdcMa, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
                        .addComponent(txtdcGia)
                        .addComponent(txtdcChucnang))
                    .addComponent(btndcThem))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 62, Short.MAX_VALUE)
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 605, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(338, 338, 338)
                .addComponent(jLabel29)
                .addGap(18, 18, 18)
                .addComponent(txttimkiemdungcu, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btntimkiemdungcu)
                .addContainerGap(238, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap(528, Short.MAX_VALUE)
                .addComponent(btndcXoa)
                .addGap(255, 255, 255))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel29)
                    .addComponent(txttimkiemdungcu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btntimkiemdungcu))
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel22)
                            .addComponent(txtdcMa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel23)
                            .addComponent(txtdcTen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel24)
                            .addComponent(txtdcNsx, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel25)
                            .addComponent(txtdcGia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel26)
                            .addComponent(txtdcChucnang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(46, 46, 46)
                        .addComponent(btndcThem))
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 311, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(btndcXoa)
                .addContainerGap(58, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Quản lý dụng cụ tập luyện", jPanel4);

        jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255)));

        jLabel13.setText("Tên nội dung :");

        btnXoanoidung.setBackground(new java.awt.Color(0, 0, 0));
        btnXoanoidung.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        btnXoanoidung.setForeground(new java.awt.Color(255, 0, 0));
        btnXoanoidung.setText("Xóa nội dung");
        btnXoanoidung.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnXoanoidungActionPerformed(evt);
            }
        });

        btnThemnoidung.setBackground(new java.awt.Color(0, 0, 0));
        btnThemnoidung.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnThemnoidung.setForeground(new java.awt.Color(255, 0, 0));
        btnThemnoidung.setText("Thêm nội dung");
        btnThemnoidung.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThemnoidungActionPerformed(evt);
            }
        });

        btnSuanoidung.setBackground(new java.awt.Color(0, 0, 0));
        btnSuanoidung.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnSuanoidung.setForeground(new java.awt.Color(255, 0, 51));
        btnSuanoidung.setText("Sửa nội dung");
        btnSuanoidung.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSuanoidungActionPerformed(evt);
            }
        });

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Mã nội dung", "Tên nội dung", "Mô tả", "Dụng cụ", "Chi phí"
            }
        ));
        jTable2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable2MouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(jTable2);

        jLabel12.setText("Mã nội dung :");

        jLabel15.setText("Tên dụng cụ :");

        jLabel17.setText("Chi phí :");

        jLabel14.setText("Mô tả :");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel12)
                    .addComponent(jLabel13)
                    .addComponent(jLabel14)
                    .addComponent(jLabel15)
                    .addComponent(jLabel17))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(cbbNDTtendungcu, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtChiphi)
                            .addComponent(txtMota)
                            .addComponent(txtTennoidung)
                            .addComponent(txtManoidung, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 527, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(69, 69, 69)
                        .addComponent(btnThemnoidung, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(52, 52, 52)
                        .addComponent(btnSuanoidung, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(57, 57, 57)
                        .addComponent(btnXoanoidung, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(78, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(54, 54, 54)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtManoidung, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel12))
                        .addGap(33, 33, 33)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13)
                            .addComponent(txtTennoidung, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(24, 24, 24)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtMota, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel14))
                        .addGap(27, 27, 27)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel15)
                            .addComponent(cbbNDTtendungcu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(31, 31, 31)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtChiphi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel17)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(36, 36, 36)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 246, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 68, Short.MAX_VALUE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnThemnoidung, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnXoanoidung, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSuanoidung, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(83, 83, 83))
        );

        jTabbedPane1.addTab("Quản lý nội dung tập", jPanel3);

        jPanel6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255)));

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 892, Short.MAX_VALUE)
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 472, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Thay đổi mật khẩu", jPanel6);

        tabDkLop.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Mã lớp", "Tên lớp", "Khung giờ", "Người hướng dẫn"
            }
        ));
        tabDkLop.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tabDkLopMouseClicked(evt);
            }
        });
        jScrollPane6.setViewportView(tabDkLop);

        tabDkThanhvien.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Mã thành viên", "Tên thành viên", "Ngày sinh", "Giới tính"
            }
        ));
        tabDkThanhvien.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tabDkThanhvienMouseClicked(evt);
            }
        });
        jScrollPane7.setViewportView(tabDkThanhvien);

        jLabel16.setText("Nhập tên lớp:");

        btnDkTimkiem.setForeground(new java.awt.Color(0, 0, 255));
        btnDkTimkiem.setText("Tìm kiếm");
        btnDkTimkiem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDkTimkiemActionPerformed(evt);
            }
        });

        jLabel30.setText("Nhập tên thành viên:");

        btnDkTimkiemthanhvien.setForeground(new java.awt.Color(0, 0, 255));
        btnDkTimkiemthanhvien.setText("Tìm kiếm");
        btnDkTimkiemthanhvien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDkTimkiemthanhvienActionPerformed(evt);
            }
        });

        btnDkThanhvien.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnDkThanhvien.setForeground(new java.awt.Color(0, 0, 204));
        btnDkThanhvien.setText("Đăng ký");
        btnDkThanhvien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDkThanhvienActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 379, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, Short.MAX_VALUE)
                .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(17, 17, 17))
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(39, 39, 39)
                .addComponent(jLabel16)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(txtDkTimkiemlop, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnDkTimkiem)
                .addGap(116, 116, 116)
                .addComponent(jLabel30)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(txtDkTimkiemthnahvien, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnDkTimkiemthanhvien)
                .addContainerGap(129, Short.MAX_VALUE))
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(368, 368, 368)
                .addComponent(btnDkThanhvien)
                .addContainerGap(441, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(btnDkTimkiem)
                    .addComponent(txtDkTimkiemlop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel30)
                    .addComponent(txtDkTimkiemthnahvien, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnDkTimkiemthanhvien))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane6, 0, 0, Short.MAX_VALUE)
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 293, Short.MAX_VALUE))
                .addGap(35, 35, 35)
                .addComponent(btnDkThanhvien)
                .addContainerGap(68, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Quản lý đăng ký", jPanel5);

        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255)));

        tabthanhvien.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Mã thành viên", "Tên thành vên", "Giới tính", "Ngày sinh", "SĐT", "Địa chỉ"
            }
        ));
        tabthanhvien.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tabthanhvienMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tabthanhvien);

        jLabel3.setText("Mã thành viên:");

        jLabel4.setText("Tên thành viên:");

        jLabel5.setText("Giới tính:");

        jLabel6.setText("Ngày sinh:");

        jLabel7.setText("SĐT:");

        jLabel8.setText("Tên đăng nhập:");

        jLabel9.setText("Mật khẩu:");

        jLabel10.setText("Nhập lại mật khẩu:");

        btnthemthanhvien.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        btnthemthanhvien.setForeground(new java.awt.Color(0, 0, 204));
        btnthemthanhvien.setText("Thêm Thành Viên");
        btnthemthanhvien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnthemthanhvienActionPerformed(evt);
            }
        });

        btnsuathanhvien.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnsuathanhvien.setForeground(new java.awt.Color(0, 0, 204));
        btnsuathanhvien.setText("Sửa Thông Tin");
        btnsuathanhvien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnsuathanhvienActionPerformed(evt);
            }
        });

        btnxoathanhvien.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnxoathanhvien.setForeground(new java.awt.Color(0, 0, 204));
        btnxoathanhvien.setText("Xóa Thành Viên");
        btnxoathanhvien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnxoathanhvienActionPerformed(evt);
            }
        });

        jLabel11.setText("Địa chỉ:");

        cbbgioitinh.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Chọn giới tính", "Nam", "Nữ" }));

        jLabel27.setText("Cấp độ:");

        cbbcapdo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Thành viên", "Quản lý" }));

        jLabel28.setText("Nhập tên thành viên:");

        tbntimkiem.setForeground(new java.awt.Color(0, 0, 204));
        tbntimkiem.setText("Tìm kiếm");
        tbntimkiem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbntimkiemActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jLabel10)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txtlaimatkhau))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jLabel9)
                            .addGap(45, 45, 45)
                            .addComponent(txtmatkhau))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jLabel8)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txttendangnhap))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel4)
                                .addComponent(jLabel5)
                                .addComponent(jLabel11)
                                .addComponent(jLabel6)
                                .addComponent(jLabel3)
                                .addComponent(jLabel7))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(cbbgioitinh, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(txtsdt)
                                .addComponent(cldngaysinh, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(txttenthanhvien)
                                .addComponent(txtmathanhvien, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)
                                .addComponent(txtdiachi))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel27)
                        .addGap(37, 37, 37)
                        .addComponent(cbbcapdo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(61, 61, 61)
                        .addComponent(jLabel28)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txttimkiem, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(32, 32, 32)
                        .addComponent(tbntimkiem))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(47, 47, 47)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 583, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(111, 111, 111))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(54, 54, 54)
                .addComponent(btnthemthanhvien)
                .addGap(163, 163, 163)
                .addComponent(btnsuathanhvien)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 168, Short.MAX_VALUE)
                .addComponent(btnxoathanhvien)
                .addGap(204, 204, 204))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(35, 35, 35)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtmathanhvien, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3))
                        .addGap(14, 14, 14)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(txttenthanhvien, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(cbbgioitinh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel6)
                            .addComponent(cldngaysinh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(12, 12, 12)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7)
                            .addComponent(txtsdt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel11)
                            .addComponent(txtdiachi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8)
                            .addComponent(txttendangnhap, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(12, 12, 12)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9)
                            .addComponent(txtmatkhau, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtlaimatkhau, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel10))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbbcapdo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel27)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel28)
                                .addComponent(txttimkiem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(tbntimkiem))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 306, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnthemthanhvien)
                    .addComponent(btnsuathanhvien)
                    .addComponent(btnxoathanhvien))
                .addGap(39, 39, 39))
        );

        jTabbedPane1.addTab("Quản lý thành viên", jPanel1);

        jPanel8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255)));

        tabNguoihuongdan.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Mã giáo viên", "Tên giáo vên", "Giới tính", "Ngày sinh", "SĐT", "Địa chỉ", "Trình độ", "Nội dung hướng dẫn"
            }
        ));
        tabNguoihuongdan.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tabNguoihuongdanMouseClicked(evt);
            }
        });
        jScrollPane8.setViewportView(tabNguoihuongdan);

        jLabel31.setText("Mã giáo viên:");

        jLabel32.setText("Tên giáo viên:");

        jLabel33.setText("Giới tính:");

        jLabel34.setText("Ngày sinh:");

        jLabel35.setText("SĐT:");

        jLabel36.setText("Tên đăng nhập:");

        jLabel37.setText("Mật khẩu:");

        jLabel38.setText("Nhập lại mật khẩu:");

        btnNHDthem.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnNHDthem.setForeground(new java.awt.Color(0, 0, 204));
        btnNHDthem.setText("Thêm Giáo Viên");
        btnNHDthem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNHDthemActionPerformed(evt);
            }
        });

        btnNHDsua.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnNHDsua.setForeground(new java.awt.Color(0, 0, 204));
        btnNHDsua.setText("Sửa Thông Tin");
        btnNHDsua.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNHDsuaActionPerformed(evt);
            }
        });

        btnNHDxoa.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnNHDxoa.setForeground(new java.awt.Color(0, 0, 204));
        btnNHDxoa.setText("Xóa Giáo Viên");
        btnNHDxoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNHDxoaActionPerformed(evt);
            }
        });

        jLabel39.setText("Địa chỉ:");

        cbbNHDgioitinh.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Chọn giới tính", "Nam", "Nữ" }));

        jLabel40.setText("Cấp độ:");

        cbbNHDcapdo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Quản lý" }));

        jLabel41.setText("Nhập tên thành viên:");

        txtNHDtimkiem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtNHDtimkiemActionPerformed(evt);
            }
        });

        tbnNHDtimkiem.setForeground(new java.awt.Color(0, 0, 204));
        tbnNHDtimkiem.setText("Tìm kiếm");
        tbnNHDtimkiem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbnNHDtimkiemActionPerformed(evt);
            }
        });

        jLabel42.setText("Trình độ:");

        jLabel43.setText("Nội dung dậy:");

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(jLabel38)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtNHDlaimatkhau, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE))
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(jLabel37)
                                .addGap(45, 45, 45)
                                .addComponent(txtNHDmatkhau, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE))
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(jLabel36)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtNHDtendn, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE))
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(jLabel31)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtNHDma, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel32)
                                    .addComponent(jLabel33)
                                    .addComponent(jLabel35)
                                    .addComponent(jLabel42))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel8Layout.createSequentialGroup()
                                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                            .addComponent(cldNHDngaysinh, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(cbbNHDgioitinh, javax.swing.GroupLayout.Alignment.LEADING, 0, 110, Short.MAX_VALUE))
                                        .addGap(39, 39, 39))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                                        .addComponent(txtNHDten, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(txtNHDdiachi, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                                            .addComponent(txtNHDsdt, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                                            .addComponent(txtNHDtrinhdo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                                            .addComponent(cbbNHDnoidung, javax.swing.GroupLayout.Alignment.LEADING, 0, 150, Short.MAX_VALUE))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))))
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(jLabel40)
                                .addGap(37, 37, 37)
                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(btnNHDthem)
                                    .addComponent(cbbNHDcapdo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(19, 19, 19)))
                        .addGroup(jPanel8Layout.createSequentialGroup()
                            .addComponent(jLabel34)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel39)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                    .addComponent(jLabel43, javax.swing.GroupLayout.Alignment.LEADING))
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(123, 123, 123)
                        .addComponent(jLabel41)
                        .addGap(18, 18, 18)
                        .addComponent(txtNHDtimkiem, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(30, 30, 30)
                        .addComponent(tbnNHDtimkiem))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 605, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(165, 165, 165)
                        .addComponent(btnNHDsua)
                        .addGap(83, 83, 83)
                        .addComponent(btnNHDxoa)))
                .addGap(27, 27, 27))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel31)
                            .addComponent(txtNHDma, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel32)
                            .addComponent(txtNHDten, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel33)
                            .addComponent(cbbNHDgioitinh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel34)
                            .addComponent(cldNHDngaysinh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel35)
                            .addComponent(txtNHDsdt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addGap(22, 22, 22)
                                .addComponent(jLabel39))
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addComponent(txtNHDdiachi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtNHDtrinhdo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel42))
                        .addGap(14, 14, 14)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel43)
                            .addComponent(cbbNHDnoidung, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(13, 13, 13)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtNHDtendn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel36))
                        .addGap(12, 12, 12)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel37)
                            .addComponent(txtNHDmatkhau, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtNHDlaimatkhau, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel38))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cbbNHDcapdo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel40)))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel41)
                            .addComponent(txtNHDtimkiem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tbnNHDtimkiem))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 306, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnNHDsua)
                            .addComponent(btnNHDxoa))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnNHDthem)
                .addGap(25, 25, 25))
        );

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, 463, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Quản lý người hướng dẫn", jPanel7);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/banner.PNG"))); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(56, 56, 56)
                        .addComponent(jLabel2))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 899, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGroup(layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 502, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void btnthemthanhvienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnthemthanhvienActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
    
    String matv = txtmathanhvien.getText();
    String tentv = txttenthanhvien.getText();
    Object gt = cbbgioitinh.getSelectedItem();
    Date ngaysinh = cldngaysinh.getDate();
    String sdt = txtsdt.getText();
    String diachi = txtdiachi.getText();
    String tendn = txttendangnhap.getText();
    String matkhau = txtmatkhau.getText();
    String laimatkhau = txtlaimatkhau.getText();
    String date = null;
     
    
    
    
    if(btnthemthanhvien.getText().equals("Thêm Thành Viên"))
    {
        txtmathanhvien.setText("");
        txttenthanhvien.setText("");
        cbbgioitinh.setSelectedItem("Chọn giới rính");
        cldngaysinh.setDate(null);
        txtsdt.setText("");
        txtdiachi.setText("");
        txttendangnhap.setText("");
        txtmatkhau.setText("");
        txtlaimatkhau.setText("");
        
        txtmathanhvien.setEnabled(true);
        txttendangnhap.setEnabled(true);
        txtmatkhau.setEnabled(true);
        txtlaimatkhau.setEnabled(true);
        btnsuathanhvien.setEnabled(false);
        btnxoathanhvien.setEnabled(false);
        btnthemthanhvien.setText("Lưu Thành Viên");
    }
    else
    {   
        if(matv.equals("") || tentv.equals("") || gt.equals("Chọn giới tính") || tendn.equals("") || matkhau.equals("")
                || !matkhau.equals(laimatkhau))
        {
            JOptionPane.showMessageDialog(this,"Hãy nhập đủ thông tin !");
        }
        else
        {   
            if(btnthemthanhvien.getText().equals("Lưu Thành Viên"))
            {
                btnthemthanhvien.setText("Thêm Thành Viên");
            }
            btnthemthanhvien.setText("Thêm Thành Viên");
            String sql2 = "select Ten from Dangnhap where Ten = '"+tendn+"'";
            try
            {
                rsthanhvien2 = obj.executeSQL(sql2); 
                if(rsthanhvien2.next())
                {
                    JOptionPane.showMessageDialog(this,"Tên Đăng nhập đã tồn tại !");
                }
                else
                {
                    int level = 1;
                    if(cbbcapdo.getSelectedItem().equals("Thành viên"))
                    {
                        level = 1;
                    }
                    else
                    {
                        level = 2;
                    }
                    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); 
                    date = formatter.format(ngaysinh);
                    String sql = "exec sp_Thanhvien_Insert N'"+matv+"',N'"+tentv+"',N'"+gt+"','"+date+"','"+sdt+"',N'"+diachi+"'";

                    String sql1 = "exec sp_Dangnhap_Insert '"+tendn+"','"+matkhau+"',"+level+",'"+matv+"'";
                    try
                    {
                        obj.executeUpdate(sql);
                        obj.executeUpdate(sql1);
                        JOptionPane.showMessageDialog(this,"Thêm thành viền thành công !");

                    }
                    catch(SQLException e)
                    {
                        e.printStackTrace();
                    }
                }
                }
                catch(SQLException e)
                {
                    e.printStackTrace();
                }


        }
        loadthanhvien();
    }
    
}//GEN-LAST:event_btnthemthanhvienActionPerformed

private void btnsuathanhvienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnsuathanhvienActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
    
    String matv = txtmathanhvien.getText();
    String tentv = txttenthanhvien.getText();
    Object gt = cbbgioitinh.getSelectedItem();
    String sdt = txtsdt.getText();
    String diachi = txtdiachi.getText();
    Date ngaysinh = cldngaysinh.getDate();
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); 
    String date = formatter.format(ngaysinh); 
    String sql = "exec sp_Thanhvien_Update N'"+matv+"',N'"+tentv+"',N'"+gt+"','"+date+"','"+sdt+"',N'"+diachi+"'";
    
    try
    {
       int i = JOptionPane.showConfirmDialog(this,"Bạn có muốn sửa thông tin của thành viên này?",
                "Xóa thành viên",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);
        if(i==0)
        {
            obj.executeUpdate(sql);
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    loadthanhvien();
    txtmathanhvien.setText("");
    txttenthanhvien.setText("");
    cbbgioitinh.setSelectedItem("Chọn giới tính");
    txtsdt.setText("");
    txtdiachi.setText("");
}//GEN-LAST:event_btnsuathanhvienActionPerformed

private void tabthanhvienMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabthanhvienMouseClicked
// TODO add your handling code here:
    txttendangnhap.setEnabled(false);
    txtmatkhau.setEnabled(false);
    txtlaimatkhau.setEnabled(false);
    txtmathanhvien.setEnabled(false);
    btnsuathanhvien.setEnabled(true);
    btnxoathanhvien.setEnabled(true);
    btnthemthanhvien.setText("Thêm Thành Viên");
            
    txtmathanhvien.setText(tabthanhvien.getValueAt(tabthanhvien.getSelectedRow(),0).toString());
    txttenthanhvien.setText(tabthanhvien.getValueAt(tabthanhvien.getSelectedRow(),1).toString());
    cbbgioitinh.setSelectedItem(tabthanhvien.getValueAt(tabthanhvien.getSelectedRow(),2).toString());
    String ngaysinh = tabthanhvien.getValueAt(tabthanhvien.getSelectedRow(),3).toString();
    DateFormat df=new SimpleDateFormat("dd/MM/yyyy");
        java.util.Date date = null;        
        try {
            date = df.parse(ngaysinh);
        } catch (ParseException ex) {
            Logger.getLogger(GiaodienAdmin.class.getName()).log(Level.SEVERE, null, ex);
        }
    cldngaysinh.setDate(date);
    txtsdt.setText(tabthanhvien.getValueAt(tabthanhvien.getSelectedRow(),4).toString());
    txtdiachi.setText(tabthanhvien.getValueAt(tabthanhvien.getSelectedRow(),5).toString());
}//GEN-LAST:event_tabthanhvienMouseClicked

private void btnxoathanhvienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnxoathanhvienActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
            
    String Matv = tabthanhvien.getValueAt(tabthanhvien.getSelectedRow(),0).toString();
    String sql = "EXEC sp_Thanhvien_Delete N'"+Matv+"'";
    String sql3 = "EXEC sp_Dangnhap_Delete '"+Matv+"'";
    String sql2 = "EXEC sp_Chitietlop_DeleteThanhvien N'"+Matv+"'";
    
    try
    {
        int i = JOptionPane.showConfirmDialog(this,"Bạn có muốn xóa thành viên này?",
                "Xóa thành viên",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);
        if(i==0)
        {
            obj.executeUpdate(sql3);
            obj.executeUpdate(sql2);
            obj.executeUpdate(sql);
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    loadthanhvien();
}//GEN-LAST:event_btnxoathanhvienActionPerformed

private void jTabbedPane1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTabbedPane1MouseClicked
// TODO add your handling code here:
    
}//GEN-LAST:event_jTabbedPane1MouseClicked

private void tbntimkiemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbntimkiemActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
    
    while(tblmodelthanhvien.getRowCount()>0)
    {
        tblmodelthanhvien.removeRow(0);
    }
    String sql = "SELECT Mathanhvien,Tenthanhvien,Gioitinh,convert(varchar(50),ngaysinh,103) as Ngaysinh,Dienthoai,Diachi "
            + "FROM Thanhvien "
            + "WHERE Tenthanhvien LIKE N'%"+txttimkiem.getText()+"%'";
    try
    {
        rsthanhvien1 = obj.executeSQL(sql);
        
            while(rsthanhvien1.next())
            {
                Vector v =new Vector();
                v.addElement(rsthanhvien1.getString("Mathanhvien"));
                v.addElement(rsthanhvien1.getString("Tenthanhvien"));
                v.addElement(rsthanhvien1.getString("Gioitinh"));
                v.addElement(rsthanhvien1.getString("Ngaysinh"));
                v.addElement(rsthanhvien1.getString("Dienthoai"));
                v.addElement(rsthanhvien1.getString("Diachi"));
                tblmodelthanhvien.addRow(v);
            }
            tabthanhvien.setModel(tblmodelthanhvien);
        if(tblmodelthanhvien.getRowCount()==0)
        {
            JOptionPane.showMessageDialog(this,"Không tìm thấy kết quả !");
        }
    }
    
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}//GEN-LAST:event_tbntimkiemActionPerformed

private void txttimkiemdungcuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txttimkiemdungcuActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txttimkiemdungcuActionPerformed

private void btnThemlopActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemlopActionPerformed

    connect obj = new connect();
    Connection con = obj.connect();
    
    String malop = txtMalop.getText();
    String tenlop = txtTenlop.getText();
    String khunggio = txtKhunggio.getText();
    Object nguoihuongdan = cbbNguoihuongdan.getSelectedItem();
    Date ngaybatdau = cldLopNgaybatdau.getDate();
    Date ngayketthuc = cldLopNgayketthuc.getDate();
    
    String manhd = null;
    
    try{
        rs = obj.executeSQL("select Manguoihuongdan from Nguoihuongdan where Tennguoihuongdan = N'"+nguoihuongdan+"'");
        while(rs.next())
        {
            manhd = rs.getString("Manguoihuongdan");
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); 
    String date1 = formatter.format(ngaybatdau);
    String date2 = formatter.format(ngayketthuc);
    String sql = "exec sp_Lop_Insert N'"+malop+"',N'"+tenlop+"',N'"+khunggio+"','"+manhd+"','"+date1+"','"+date2+"'";
    
    if(btnThemlop.getText().equals("Thêm Lớp"))
    {
        //txtMalop.setEnabled(true);
        btnThemlop.setText("Lưu Lớp");
    }
    else
    {   
       /* if()
        {*/
            try
            {
                obj.executeUpdate(sql);
                JOptionPane.showMessageDialog(this,"Thêm lớp thành công !");
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
    }
    loadlop();
}//GEN-LAST:event_btnThemlopActionPerformed

private void btnSualopActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSualopActionPerformed

    connect obj = new connect();
    Connection con = obj.connect();
    
    String malop = txtMalop.getText();
    String tenlop = txtTenlop.getText();
    String khunggio = txtKhunggio.getText();
    Object nguoihuongdan = cbbNguoihuongdan.getSelectedItem();
    String manguoihuongdan = null;
    Date ngaybatdau = cldLopNgaybatdau.getDate();
    SimpleDateFormat formatter1 = new SimpleDateFormat("MM/dd/yyyy"); 
    String date1 = formatter1.format(ngaybatdau); 
    Date ngayketthuc = cldLopNgayketthuc.getDate();
    SimpleDateFormat formatter2 = new SimpleDateFormat("MM/dd/yyyy"); 
    String date2 = formatter2.format(ngayketthuc); 
    
    try{
        rs = obj.executeSQL("select Manguoihuongdan from Nguoihuongdan where Tennguoihuongdan = N'"+nguoihuongdan+"'");
        while(rs.next())
        {
            manguoihuongdan = rs.getString("Manguoihuongdan");
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    String sql = "exec sp_Lop_Update N'"+malop+"',N'"+tenlop+"',N'"+khunggio+"',N'"+manguoihuongdan+"','"+date1+"','"+date2+"'";
    
    try
    {
        obj.executeUpdate(sql);
        JOptionPane.showMessageDialog(this,"Cập nhật thông tin lớp thành công !");
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    loadlop();
    txtMalop.setText("");
    txtTenlop.setText("");
    txtKhunggio.setText("");
    cbbNguoihuongdan.setSelectedItem("Chọn người hướng dẫn");
   
}//GEN-LAST:event_btnSualopActionPerformed

private void btnXoalopActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnXoalopActionPerformed

    connect obj = new connect();
    Connection con = obj.connect();
            
    String Malop = jTable3.getValueAt(jTable3.getSelectedRow(),0).toString();
    String sql = "EXEC sp_Lop_Delete N'"+Malop+"'";
    String sql2 = "Exec sp_Chhitietlop_DeleteLop N'"+Malop+"'";
    
    try
    {
        int i = JOptionPane.showConfirmDialog(this,"Bạn có muốn xóa lớp này?",
                "Xóa lớp",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);
        if(i==0)
        {
            obj.executeUpdate(sql2);
            obj.executeUpdate(sql);
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    loadlop();
}//GEN-LAST:event_btnXoalopActionPerformed
public void viewlophoc()
{
    connect obj = new connect();
    Connection con = obj.connect();
    
    String malop = jTable3.getValueAt(jTable3.getSelectedRow(),0).toString();
    
    String sql = "select Mathanhvien from Chitietlop where Malop = '"+malop+"'";
    String matv = null;
    
    while(tblmodelLop_thanhvien.getRowCount()>0)
                    {
                        tblmodelLop_thanhvien.removeRow(0);
                    }
    
    try{
        rs = obj.executeSQL(sql);
        while(rs.next())
        {
            matv = rs.getString("Mathanhvien");
            String sql2 = "SELECT Mathanhvien,Tenthanhvien,Gioitinh,convert(varchar(50),ngaysinh,103) as Ngaysinh from Thanhvien where Mathanhvien = '"+matv+"'";
                try{
                    rs1 = obj.executeSQL(sql2);
                    while(rs1.next())
                    {
                        Vector v = new Vector();
                        v.addElement(rs1.getString("Mathanhvien"));
                        v.addElement(rs1.getString("Tenthanhvien"));
                        v.addElement(rs1.getString("Ngaysinh"));
                        v.addElement(rs1.getString("Gioitinh"));
                        tblmodelLop_thanhvien.addRow(v);
                    }
                    tabLop_Thanhvien.setModel(tblmodelLop_thanhvien);
                }
                catch(SQLException e)
                {
                    e.printStackTrace();
                }
                    }
                }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}

private void jTable3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable3MouseClicked
    
    
    btnSualop.setEnabled(true);
    btnXoalop.setEnabled(true);
    txtMalop.setText(jTable3.getValueAt(jTable3.getSelectedRow(),0).toString());
    txtTenlop.setText(jTable3.getValueAt(jTable3.getSelectedRow(),1).toString());
    txtKhunggio.setText(jTable3.getValueAt(jTable3.getSelectedRow(),2).toString());
    cbbNguoihuongdan.setSelectedItem(jTable3.getValueAt(jTable3.getSelectedRow(),3).toString());
    String ngaybatdau = jTable3.getValueAt(jTable3.getSelectedRow(),4).toString();
    DateFormat df=new SimpleDateFormat("dd/MM/yyyy");
        java.util.Date date = null;        
        try {
            date = df.parse(ngaybatdau);
        } catch (ParseException ex) {
            Logger.getLogger(GiaodienAdmin.class.getName()).log(Level.SEVERE, null, ex);
        }
    cldLopNgaybatdau.setDate(date);
    String ngayketthuc = jTable3.getValueAt(jTable3.getSelectedRow(),5).toString();
    DateFormat dt=new SimpleDateFormat("dd/MM/yyyy");
        java.util.Date date1 = null;        
        try {
            date1 = df.parse(ngayketthuc);
        } catch (ParseException ex) {
            Logger.getLogger(GiaodienAdmin.class.getName()).log(Level.SEVERE, null, ex);
        }
    cldLopNgayketthuc.setDate(date1);
    viewlophoc();
}//GEN-LAST:event_jTable3MouseClicked

public void loaddungcu(){
    connect obj = new connect();
    Connection con = obj.connect();
    
    btndcXoa.setEnabled(false);
    
    while(tblmodeldungcu.getRowCount()>0)
    {
        tblmodeldungcu.removeRow(0);
    }
    String sql = "EXEC sp_Dungcu_GetByAll";
    try
    {
        rsdungcu = obj.executeSQL(sql);
        while(rsdungcu.next())
        {
            Vector v =new Vector();
            v.addElement(rsdungcu.getString("Madungcu"));
            v.addElement(rsdungcu.getString("Tendungcu"));
            v.addElement(rsdungcu.getString("Noisanxuat"));
            v.addElement(rsdungcu.getString("Gia"));
            v.addElement(rsdungcu.getString("Chucnang"));
            tblmodeldungcu.addRow(v);
        }
       tabdungcu.setModel(tblmodeldungcu);
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}

private void btndcThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btndcThemActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
    
    String madc = txtdcMa.getText();
    String tendc = txtdcTen.getText();
    String nsx = txtdcNsx.getText();
    String gia = txtdcGia.getText();
    String chucnang = txtdcChucnang.getText();
    
    
    if(btndcThem.getText().equals("Thêm dụng cụ"))
    {
        txtdcMa.setText("");
        txtdcTen.setText("");
        txtdcNsx.setText("");
        txtdcGia.setText("");
        txtdcChucnang.setText("");
        
        btndcXoa.setEnabled(false);
        btndcThem.setText("Lưu dụng cụ");
    }
    else
    {   
        if(madc.equals("") || tendc.equals("") || nsx.equals("") || gia.equals("") || chucnang.equals(""))
        {
            JOptionPane.showMessageDialog(this,"Hãy nhập đủ thông tin !");
        }
        else
        {   
            if(btndcThem.getText().equals("Lưu dụng cụ"))
            {
                btndcThem.setText("Thêm dụng cụ");
            }
           
            
                   
                    String sql = "exec sp_Dungcu_Insert N'"+madc+"',N'"+tendc+"',N'"+nsx+"','"+gia+"',N'"+chucnang+"'";

                    try
                    {
                        obj.executeUpdate(sql);
                        JOptionPane.showMessageDialog(this,"Thêm dụng cụ thành công !");

                    }
                    catch(SQLException e)
                    {
                        e.printStackTrace();
                    }
                }
        }
        loaddungcu();
}//GEN-LAST:event_btndcThemActionPerformed

private void btnXoanoidungActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnXoanoidungActionPerformed
   
    connect obj = new connect();
    Connection con = obj.connect();
            
    String Mand = jTable2.getValueAt(jTable2.getSelectedRow(),0).toString();
    String sql = "EXEC sp_Noidungtap_Delete N'"+Mand+"'";
    String sql1 = "EXEC sp_Nguoihuongdan_Delete N'"+Mand+"'";
    String sql2 = "Select Manguoihuongdan from Nguoihuongdan where Manoidung = N'"+Mand+"'";
    try
    {
        rsnguoihuongdan = obj.executeSQL(sql2);
        while(rsnguoihuongdan.next())
        {
            String Manhd = rsnguoihuongdan.getString("Manguoihuongdan");
            String sql6 = "EXEC sp_Dangnhap_Delete '"+Manhd+"'";
            String sql3 = "Select Malop from Lop where Manguoihuongdan = N'"+Manhd+"'";
            try
            {
                rslop = obj.executeSQL(sql3);
                while(rslop.next())
                {
                    String Malop = rslop.getString("Malop");
                    String sql4 = "EXEC sp_Lop_Delete N'"+Malop+"'";
                    String sql5 = "EXEC sp_Chitietlop_DeleteLop N'"+Malop+"'";
                    try
                    {
                        int i = JOptionPane.showConfirmDialog(this,"Bạn có muốn xóa nội dung này?",
                        "Xóa nội dung",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);
                        if(i==0)
                        {
                            obj.executeUpdate(sql6);
                            obj.executeUpdate(sql5);
                            obj.executeUpdate(sql4);
                            obj.executeUpdate(sql1);
                            obj.executeUpdate(sql);
                        }
                    }
                    catch(SQLException e)
                    {
                        e.printStackTrace();
                    }
                }
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    loadnoidungtap();
}//GEN-LAST:event_btnXoanoidungActionPerformed

private void btnThemnoidungActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThemnoidungActionPerformed
    connect obj = new connect();
    Connection con = obj.connect();
    
    String mand = txtManoidung.getText();
    String tennd = txtTennoidung.getText();
    String mota = txtMota.getText();
    Object tendc = cbbNDTtendungcu.getSelectedItem();
    String chiphi = txtChiphi.getText();
    String madc = "";
    String sql2 = "select Madungcu from Dungcu where Tendungcu = N'"+tendc+"'";
    try{
        rs = obj.executeSQL(sql2);
        while(rs.next())
        {
            madc = rs.getString("Madungcu");
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    
    String sql = "exec sp_Noidungtap_Insert N'"+mand+"',N'"+tennd+"',N'"+mota+"',N'"+madc+"',N'"+chiphi+"'";
    if(btnThemnoidung.getText().equals("Thêm nôi dung"))
    {
        txtManoidung.setEnabled(true);
        btnThemnoidung.setText("Lưu nội dung");
    }
    else
    {   
            try
            {
                obj.executeUpdate(sql);
                JOptionPane.showMessageDialog(this,"Thêm nội dung thành công !");
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        
    }
    loadnoidungtap();                                               
}//GEN-LAST:event_btnThemnoidungActionPerformed

private void btnSuanoidungActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSuanoidungActionPerformed

    connect obj = new connect();
    Connection con = obj.connect();
    
    String mand = txtManoidung.getText();
    String tennd = txtTennoidung.getText();
    String mota = txtMota.getText();
    Object tendc = cbbNDTtendungcu.getSelectedItem();
    String chiphi = txtChiphi.getText();
    String madc = null;
    String sql2 = "select Madungcu from Dungcu where Tendungcu = N'"+tendc+"'";
    try{
        rs = obj.executeSQL(sql2);
        while(rs.next())
        {
            madc = rs.getString("Madungcu");
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    String sql = "exec sp_Noidungtap_Update N'"+mand+"',N'"+tennd+"',N'"+mota+"',N'"+madc+"',N'"+chiphi+"'";
    
    try
    {
        obj.executeUpdate(sql);
        JOptionPane.showMessageDialog(this,"Cập nhật thông tin nội dung thành công !");
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    loadnoidungtap();
    txtManoidung.setText("");
    txtTennoidung.setText("");
    txtMota.setText("");
    txtChiphi.setText("");
}//GEN-LAST:event_btnSuanoidungActionPerformed

private void jTable2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable2MouseClicked

    txtManoidung.setEnabled(false);
    btnSuanoidung.setEnabled(true);
    btnXoanoidung.setEnabled(true);
    txtManoidung.setText(jTable2.getValueAt(jTable2.getSelectedRow(),0).toString());
    txtTennoidung.setText(jTable2.getValueAt(jTable2.getSelectedRow(),1).toString());
    txtMota.setText(jTable2.getValueAt(jTable2.getSelectedRow(),2).toString());
    cbbNDTtendungcu.setSelectedItem(jTable2.getValueAt(jTable2.getSelectedRow(),3).toString());
    txtChiphi.setText(jTable2.getValueAt(jTable2.getSelectedRow(),4).toString());
}//GEN-LAST:event_jTable2MouseClicked

private void tabdungcuMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabdungcuMouseClicked
// TODO add your handling code here:
    btndcXoa.setEnabled(true);
    //txtdcMa.setText(tabdungcu.getValueAt(tabdungcu.getSelectedRow(),0).toString());
    //txtdcTen.setText(tabdungcu.getValueAt(tabdungcu.getSelectedRow(),1).toString());
    //txtdcNsx.setText(tabdungcu.getValueAt(tabdungcu.getSelectedRow(),2).toString());
    //txtdcGia.setText(tabdungcu.getValueAt(tabdungcu.getSelectedRow(),3).toString());
    //txtdcChucnang.setText(tabdungcu.getValueAt(tabdungcu.getSelectedRow(),4).toString());
    
}//GEN-LAST:event_tabdungcuMouseClicked

private void btndcXoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btndcXoaActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
            
    String Madc = tabdungcu.getValueAt(tabdungcu.getSelectedRow(),0).toString();
    String sql = "EXEC sp_Dungcu_Delete N'"+Madc+"'";
    String sql1 = "EXEC sp_Noidungtap_Delete N'"+Madc+"'";
    String sql2 = "Select Manoidung from Noidungtap where Madungcu = N'"+Madc+"'";
    try
    {
        rsnoidungtap = obj.executeSQL(sql2);
        while(rsnoidungtap.next())
        {
            String Mandt = rsnoidungtap.getString("Manoidung");
            String sql3 = "EXEC sp_Nguoihuongdan_Delete N'"+Mandt+"'";
            String sql4 = "Select Manguoihuongdan from Nguoihuongdan where Manoidung = N'"+Mandt+"'";
            try
            {
                rsnguoihuongdan = obj.executeSQL(sql4);
                while(rsnguoihuongdan.next())
                {
                    String Manhd = rsnguoihuongdan.getString("Manguoihuongdan");
                    String sql8 = "EXEC sp_Dangnhap_Delete '"+Manhd+"'";
                    String sql5 = "Select Malop from Lop where Manguoihuongdan = N'"+Manhd+"'";
                    try
                    {
                        rslop = obj.executeSQL(sql5);
                        while(rslop.next())
                        {
                            String Malop = rslop.getString("Malop");
                            String sql6 = "EXEC sp_Lop_Delete N'"+Malop+"'";
                            String sql7 = "EXEC sp_Chitietlop_DeleteLop N'"+Malop+"'";
                            try
                            {
                                int i = JOptionPane.showConfirmDialog(this,"Bạn có muốn xóa dụng cụ này?",
                                        "Xóa dụng cụ",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);
                                if(i==0)
                                {
                                    obj.executeUpdate(sql8);
                                    obj.executeUpdate(sql7);
                                    obj.executeUpdate(sql6);
                                    obj.executeUpdate(sql3);
                                    obj.executeUpdate(sql1);
                                    obj.executeUpdate(sql);
                                }
                            }
                            catch(SQLException e)
                            {
                                e.printStackTrace();
                            }
                        }
                    }
                    catch(SQLException e)
                    {
                        e.printStackTrace();
                    }
                }
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    loaddungcu();
}//GEN-LAST:event_btndcXoaActionPerformed
public void loaddangky(){
    connect obj = new connect();
    Connection con = obj.connect();
    
    btnDkThanhvien.setEnabled(false);
  
    while(tabDkLop.getRowCount()>0)
    {
        tblmodelDkLop.removeRow(0);
    }
    String sql = "EXEC sp_Lop_GetByAll";
   
    try
    {
        rslop = obj.executeSQL(sql);
        while(rslop.next())
        {
            Vector v =new Vector();
            v.addElement(rslop.getString("Malop"));
            v.addElement(rslop.getString("Tenlop"));
            v.addElement(rslop.getString("Khunggio"));
            String manhd = rslop.getString("Manguoihuongdan");
            try{
                rs = obj.executeSQL("select Tennguoihuongdan from Nguoihuongdan where Manguoihuongdan = '"+manhd+"'");
                while(rs.next())
                {
                    v.addElement(rs.getString("Tennguoihuongdan"));
                }
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
            tblmodelDkLop.addRow(v);
        }
       tabDkLop.setModel(tblmodelDkLop);
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    
    while(tblmodelDkThanhvien.getRowCount()>0)
    {
        tblmodelDkThanhvien.removeRow(0);
    }
    String sql1 = "EXEC sp_Thanhvien_GetByAll";
    try
    {
        rsthanhvien1 = obj.executeSQL(sql1);
        while(rsthanhvien1.next())
        {
            Vector v =new Vector();
            v.addElement(rsthanhvien1.getString("Mathanhvien"));
            v.addElement(rsthanhvien1.getString("Tenthanhvien"));
            v.addElement(rsthanhvien1.getString("Gioitinh"));
            v.addElement(rsthanhvien1.getString("Ngaysinh"));
            tblmodelDkThanhvien.addRow(v);
        }
       tabDkThanhvien.setModel(tblmodelDkThanhvien);
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}
private void btnDkThanhvienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDkThanhvienActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();

    String sql = "sp_Chitietlop_Insert '"+DKmalop+"','"+DKmathanhvien+"'";
    String sql1 = "select * from Chitietlop where Mathanhvien = '"+DKmathanhvien+"'and Malop = '"+DKmalop+"'";
    try{
        rs = obj.executeSQL(sql1);
        if(rs.next())
        {
            JOptionPane.showMessageDialog(this,"Thành viên đã thuộc lớp này !");
        }
        else
        {
            try
            {
                obj.executeUpdate(sql);
                JOptionPane.showMessageDialog(this,"Thêm thành viên vào lớp học thành công !");
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
        
        
}//GEN-LAST:event_btnDkThanhvienActionPerformed

public void loadnguoihuongdan() throws SQLException{
     connect obj = new connect();
    Connection con = obj.connect();
    
    btnNHDsua.setEnabled(false);
    btnNHDxoa.setEnabled(false);
    txtNHDma.setEditable(true);
    txtNHDmatkhau.setEnabled(true);
    txtNHDlaimatkhau.setEnabled(true);
    txtNHDtendn.setEnabled(true);
    
    while(cbbNHDnoidung.getItemCount()>0)
    {
        cbbNHDnoidung.removeAllItems();
    }
    try{
    rsnguoihuongdan = obj.executeSQL("select Tennoidung from Noidungtap");
    while(rsnguoihuongdan.next())
    {
        cbbNHDnoidung.addItem(rsnguoihuongdan.getString("Tennoidung"));
    }
    rsnguoihuongdan = null;
    
    while(tblmodelnguoihuongdan.getRowCount()>0)
    {
        tblmodelnguoihuongdan.removeRow(0);
    }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    String sql = "exec sp_Nguoihuongdan_GetByAll";

    try
    {
        rsnguoihuongdan = obj.executeSQL(sql);
        while(rsnguoihuongdan.next())
        {
            Vector v =new Vector();
            v.addElement(rsnguoihuongdan.getString("Manguoihuongdan"));
            v.addElement(rsnguoihuongdan.getString("Tennguoihuongdan"));
            v.addElement(rsnguoihuongdan.getString("Gioitinh"));
            v.addElement(rsnguoihuongdan.getString("Ngaysinh"));
            v.addElement(rsnguoihuongdan.getString("Dienthoai"));
            v.addElement(rsnguoihuongdan.getString("Diachi"));
            v.addElement(rsnguoihuongdan.getString("Trinhdo"));
            String ma = rsnguoihuongdan.getString("Manoidung");
            String sql2 = "select Tennoidung from Noidungtap where Manoidung = '"+ma+"'";
            try{
                rs = obj.executeSQL(sql2);
                while(rs.next())
                {
                    v.addElement(rs.getString("Tennoidung"));
                }
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
            tblmodelnguoihuongdan.addRow(v);
        }
       tabNguoihuongdan.setModel(tblmodelnguoihuongdan);
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}
private void tabNguoihuongdanMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabNguoihuongdanMouseClicked
// TODO add your handling code here:
    txtNHDma.setEnabled(false);
    btnNHDsua.setEnabled(true);
    btnNHDxoa.setEnabled(true);
    txtNHDtendn.setEnabled(false);
    txtNHDmatkhau.setEnabled(false);
    txtNHDlaimatkhau.setEnabled(false);
    
    txtNHDma.setText(tabNguoihuongdan.getValueAt(tabNguoihuongdan.getSelectedRow(),0).toString());
    txtNHDten.setText(tabNguoihuongdan.getValueAt(tabNguoihuongdan.getSelectedRow(),1).toString());
    cbbNHDgioitinh.setSelectedItem(tabNguoihuongdan.getValueAt(tabNguoihuongdan.getSelectedRow(),2).toString());
    String ngaysinh = tabNguoihuongdan.getValueAt(tabNguoihuongdan.getSelectedRow(),3).toString();
    DateFormat df=new SimpleDateFormat("dd/MM/yyyy");
        java.util.Date date = null;        
        try {
            date = df.parse(ngaysinh);
        } catch (ParseException ex) {
            Logger.getLogger(GiaodienAdmin.class.getName()).log(Level.SEVERE, null, ex);
        }
    cldNHDngaysinh.setDate(date);
    txtNHDsdt.setText(tabNguoihuongdan.getValueAt(tabNguoihuongdan.getSelectedRow(),4).toString());
    txtNHDdiachi.setText(tabNguoihuongdan.getValueAt(tabNguoihuongdan.getSelectedRow(),5).toString());
    txtNHDtrinhdo.setText(tabNguoihuongdan.getValueAt(tabNguoihuongdan.getSelectedRow(),6).toString());
    cbbNHDnoidung.setSelectedItem(tabNguoihuongdan.getValueAt(tabNguoihuongdan.getSelectedRow(),7).toString());
}//GEN-LAST:event_tabNguoihuongdanMouseClicked

private void btnNHDthemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNHDthemActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
    
    String manhd = txtNHDma.getText();
    String tennhd = txtNHDten.getText();
    Object gt = cbbNHDgioitinh.getSelectedItem();
    Date ngaysinh = cldNHDngaysinh.getDate();
    String sdt = txtNHDsdt.getText();
    String diachi = txtNHDdiachi.getText();
    String trinhdo = txtNHDtrinhdo.getText();
    Object noidungtap = cbbNHDnoidung.getSelectedItem();
    Object capdo = cbbNHDcapdo.getSelectedItem();
    String tendn = txtNHDtendn.getText();
    String matkhau = txtNHDmatkhau.getText();
    String laimatkhau = txtNHDlaimatkhau.getText();
    String date = null;
    String ma = null;
    
    
    
    if(btnNHDthem.getText().equals("Thêm Giáo Viên"))
    {
        txtNHDma.setText("");
        txtNHDten.setText("");
        cbbNHDgioitinh.setSelectedItem("Chọn giới rính");
        cldNHDngaysinh.setDate(null);
        txtNHDsdt.setText("");
        txtNHDdiachi.setText("");
        txtNHDtrinhdo.setText("");
        txtNHDtendn.setText("");
        txtNHDmatkhau.setText("");
        txtNHDlaimatkhau.setText("");
        
        txtNHDma.setEnabled(true);
        txtNHDtendn.setEnabled(true);
        txtNHDmatkhau.setEnabled(true);
        txtNHDlaimatkhau.setEnabled(true);
        btnNHDsua.setEnabled(false);
        btnNHDxoa.setEnabled(false);
        btnNHDthem.setText("Lưu Giáo Viên");
       
    }
    else
    {   
            try {
                if(manhd.equals("") || tennhd.equals("") || gt.equals("Chọn giới tính") || tendn.equals("") || matkhau.equals("")
                        || !matkhau.equals(laimatkhau))
                {
                    JOptionPane.showMessageDialog(this,"Hãy nhập đủ thông tin !");
                }
                else
                {   
                    if(btnNHDthem.getText().equals("Lưu Giáo Viên"))
                    {
                        btnNHDthem.setText("Thêm Giáo Viên");
                    }
                    String sql3 = "select Manoidung from Noidungtap where Tennoidung = N'"+noidungtap+"'";
                    try{
                        rs = obj.executeSQL(sql3);
                        while(rs.next())
                        {
                            ma = rs.getString("Manoidung");
                        }
                    }
                    catch(SQLException e)
                    {
                        e.printStackTrace();
                    }
                    String sql2 = "select Ten from Dangnhap where Ten = '"+tendn+"'";
                    try
                    {
                        rs = obj.executeSQL(sql2); 
                        if(rs.next())
                        {
                            JOptionPane.showMessageDialog(this,"Tên Đăng nhập đã tồn tại !");
                        }
                        else
                        {
                            int level = 2;
                            if(cbbNHDcapdo.getSelectedItem().equals("Quản lý"))
                            {
                                level = 2;
                            }
                            else
                            {
                                level = 1;
                            }
                            SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); 
                            date = formatter.format(ngaysinh);
                            String sql = "exec sp_Nguoihuongdan_Insert N'"+manhd+"',N'"+tennhd+"',N'"+gt+"','"+date+"','"+sdt+"',N'"+diachi+"',N'"+trinhdo+"','"+ma+"'";

                            String sql1 = "exec sp_Dangnhap_Insert '"+tendn+"','"+matkhau+"',"+level+",'"+manhd+"'";
                            try
                            {
                                obj.executeUpdate(sql);
                                obj.executeUpdate(sql1);
                                JOptionPane.showMessageDialog(this,"Thêm giáo viên thành công !");

                            }
                            catch(SQLException e)
                            {
                                e.printStackTrace();
                            }
                        }
                        }
                        catch(SQLException e)
                        {
                            e.printStackTrace();
                        }


                }
                loadnguoihuongdan();
            } catch (SQLException ex) {
                Logger.getLogger(GiaodienAdmin.class.getName()).log(Level.SEVERE, null, ex);
            }
    }
}//GEN-LAST:event_btnNHDthemActionPerformed

private void btnNHDsuaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNHDsuaActionPerformed
// TODO add your handling code here:
    try {
            // TODO add your handling code here:
                connect obj = new connect();
                Connection con = obj.connect();
                
                String manhd = txtNHDma.getText();
                String tennhd = txtNHDten.getText();
                Object gt = cbbNHDgioitinh.getSelectedItem();
                Date ngaysinh = cldNHDngaysinh.getDate();
                String sdt = txtNHDsdt.getText();
                String diachi = txtNHDdiachi.getText();
                String trinhdo = txtNHDtrinhdo.getText();
                Object noidunday = cbbNHDnoidung.getSelectedItem();
                String ma = ""; 
                String sql2 = "select Manoidung from Noidungtap where Tennoidung = N'"+noidunday+"'";
                try{
                    rs = obj.executeSQL(sql2);
                    while(rs.next())
                    {
                        ma = rs.getString("Manoidung");
                    }
                }
                catch(SQLException e)
                {
                    e.printStackTrace();
                }
                SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); 
                String date = formatter.format(ngaysinh); 
                String sql = "exec sp_Nguoihuongdan_Update N'"+manhd+"',N'"+tennhd+"',N'"+gt+"','"+date+"','"+sdt+"',N'"+diachi+"',N'"+trinhdo+"',N'"+ma+"'";
                
                try
                {
                   int i = JOptionPane.showConfirmDialog(this,"Bạn có muốn sửa thông tin của người hướng dẫn này?",
                            "Sửa thông tin người hướng dẫn",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);
                    if(i==0)
                    {
                        obj.executeUpdate(sql);
                    }
                }
                catch(SQLException e)
                {
                    e.printStackTrace();
                }
                loadnguoihuongdan();
                txtNHDma.setText("");
                txtNHDten.setText("");
                cbbgioitinh.setSelectedItem("Chọn giới tính");
                txtNHDsdt.setText("");
                txtNHDdiachi.setText("");
        } catch (SQLException ex) {
            Logger.getLogger(GiaodienAdmin.class.getName()).log(Level.SEVERE, null, ex);
        }
}//GEN-LAST:event_btnNHDsuaActionPerformed

private void btnNHDxoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNHDxoaActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
            
    String Manhd = tabNguoihuongdan.getValueAt(tabNguoihuongdan.getSelectedRow(),0).toString();
    String sql = "EXEC sp_Nguoihuongdan_Delete N'"+Manhd+"'";
    String sql4 = "EXEC sp_Dangnhap_Delete '"+Manhd+"'";
    String sql1 = "Select Malop from Lop where Manguoihuongdan = N'"+Manhd+"'";
    try
    {
        rsnguoihuongdan = obj.executeSQL(sql1);
        while(rsnguoihuongdan.next())
        {
            String Malop = rsnguoihuongdan.getString("Malop");
            String sql2 = "EXEC sp_Lop_Delete N'"+Malop+"'";
            String sql3 = "EXEC sp_Chitietlop_DeleteLop N'"+Malop+"'";
            try
            {
                int i = JOptionPane.showConfirmDialog(this,"Bạn có muốn xóa người hướng dẫn này?",
                "Xóa người hướng dẫn",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);
                if(i==0)
                {
                    obj.executeUpdate(sql4);
                    obj.executeUpdate(sql3);
                    obj.executeUpdate(sql2);
                    obj.executeUpdate(sql);
                }
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    
          
        try {
            loadnguoihuongdan();
        } catch (SQLException ex) {
            Logger.getLogger(GiaodienAdmin.class.getName()).log(Level.SEVERE, null, ex);
        }
}//GEN-LAST:event_btnNHDxoaActionPerformed

private void tbnNHDtimkiemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbnNHDtimkiemActionPerformed
// TODO add your handling code here:
     connect obj = new connect();
    Connection con = obj.connect();
    
    while(tblmodelnguoihuongdan.getRowCount()>0)
    {
        tblmodelnguoihuongdan.removeRow(0);
    }
    String sql = "SELECT Manguoihuongdan,Tennguoihuongdan,Gioitinh,convert(varchar(50),ngaysinh,103) as Ngaysinh,Dienthoai,Diachi,Trinhdo,Manoidung "
            + "FROM Nguoihuongdan "
            + "WHERE Tennguoihuongdan LIKE N'%"+txtNHDtimkiem.getText()+"%'";
    try
    {
        rsnguoihuongdan = obj.executeSQL(sql);
        
        
            while(rsnguoihuongdan.next())
            {
                Vector v =new Vector();
                v.addElement(rsnguoihuongdan.getString("Manguoihuongdan"));
                v.addElement(rsnguoihuongdan.getString("Tennguoihuongdan"));
                v.addElement(rsnguoihuongdan.getString("Gioitinh"));
                v.addElement(rsnguoihuongdan.getString("Ngaysinh"));
                v.addElement(rsnguoihuongdan.getString("Dienthoai"));
                v.addElement(rsnguoihuongdan.getString("Diachi"));
                v.addElement(rsnguoihuongdan.getString("Trinhdo"));
                String ma = rsnguoihuongdan.getString("Manoidung");
                String sql2 = "select Tennoidung from Noidungtap where Manoidung = '"+ma+"'";
                try{
                    rs = obj.executeSQL(sql2);
                    while(rs.next())
                    {
                        v.addElement(rs.getString("Tennoidung"));
                    }
                }
                catch(SQLException e)
                {
                    e.printStackTrace();
                }
                    tblmodelnguoihuongdan.addRow(v);
                }
            tabNguoihuongdan.setModel(tblmodelnguoihuongdan);
            if(tblmodelnguoihuongdan.getRowCount() == 0)
                {
                    JOptionPane.showMessageDialog(this,"Không tìm thấy người hướng dẫn cần tìm !");
                }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}//GEN-LAST:event_tbnNHDtimkiemActionPerformed

private void btnDkTimkiemthanhvienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDkTimkiemthanhvienActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
    
    while(tblmodelDkThanhvien.getRowCount()>0)
    {
        tblmodelDkThanhvien.removeRow(0);
    }
    String sql = "SELECT Mathanhvien,Tenthanhvien,Gioitinh,convert(varchar(50),ngaysinh,103) as Ngaysinh "
            + "FROM Thanhvien "
            + "WHERE Tenthanhvien LIKE N'%"+txtDkTimkiemthnahvien.getText()+"%'";
    try
    {
        rsthanhvien1 = obj.executeSQL(sql);
        while(rsthanhvien1.next())
        {
            Vector v =new Vector();
            v.addElement(rsthanhvien1.getString("Mathanhvien"));
            v.addElement(rsthanhvien1.getString("Tenthanhvien"));
            v.addElement(rsthanhvien1.getString("Gioitinh"));
            v.addElement(rsthanhvien1.getString("Ngaysinh"));
            tblmodelDkThanhvien.addRow(v);
        }
       tabDkThanhvien.setModel(tblmodelDkThanhvien);
       if(tblmodelDkThanhvien.getRowCount() == 0 )
            {
                JOptionPane.showMessageDialog(this,"Không có thành viên cần tìm !");
            }
        
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}//GEN-LAST:event_btnDkTimkiemthanhvienActionPerformed

private void btnDkTimkiemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDkTimkiemActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
    
    while(tblmodelDkLop.getRowCount()>0)
    {
        tblmodelDkLop.removeRow(0);
    }
    String sql = "SELECT Malop,TenLop,Khunggio,Manguoihuongdan "
            + "FROM Lop "
            + "WHERE Tenlop LIKE N'%"+txtDkTimkiemlop.getText()+"%'";
    try
    {
        rslop = obj.executeSQL(sql);
        while(rslop.next())
        {
            Vector v =new Vector();
            v.addElement(rslop.getString("Malop"));
            v.addElement(rslop.getString("Tenlop"));
            v.addElement(rslop.getString("Khunggio"));
            String ma = rslop.getString("Manguoihuongdan");
            String sql2 = "select Tennguoihuongdan from Nguoihuongdan where Manguoihuongdan = '"+ma+"'";
            try
            {
                ResultSet rs = obj.executeSQL(sql2);
                while(rs.next())
                {
                    v.addElement(rs.getString("TenNguoihuongdan"));
                }
                
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
            
            tblmodelDkLop.addRow(v);
            }
       tabDkLop.setModel(tblmodelDkLop);
       if(tblmodelDkLop.getRowCount() == 0 )
            {
                JOptionPane.showMessageDialog(this,"Không có lớp cần tìm !");
            }
        
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}//GEN-LAST:event_btnDkTimkiemActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
    
    String matv = tabLop_Thanhvien.getValueAt(tabLop_Thanhvien.getSelectedRow(),0).toString();
    String sql = "exec sp_Chitietlop_DeleteThanhvien '"+matv+"'";
    try
    {
        int i = JOptionPane.showConfirmDialog(this,"Bạn có muốn xóa thành viên này khỏi lớp học?",
                "Xóa thành viên",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);
        if(i==0)
        {
            obj.executeUpdate(sql);
        }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
    viewlophoc();
}//GEN-LAST:event_jButton1ActionPerformed

private void tabDkLopMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabDkLopMouseClicked
// TODO add your handling code here:
    DKmalop = tabDkLop.getValueAt(tabDkLop.getSelectedRow(),0).toString();
    if(DKmathanhvien != null)
    {
        btnDkThanhvien.setEnabled(true);
    }
}//GEN-LAST:event_tabDkLopMouseClicked

private void tabDkThanhvienMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabDkThanhvienMouseClicked
// TODO add your handling code here:
    DKmathanhvien = tabDkThanhvien.getValueAt(tabDkThanhvien.getSelectedRow(),0).toString();
    if(DKmalop != null)
    {
        btnDkThanhvien.setEnabled(true);
    }
}//GEN-LAST:event_tabDkThanhvienMouseClicked

private void txtNHDtimkiemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNHDtimkiemActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtNHDtimkiemActionPerformed

private void btntimkiemdungcuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btntimkiemdungcuActionPerformed
// TODO add your handling code here:
    connect obj = new connect();
    Connection con = obj.connect();
       
    while(tblmodeldungcu.getRowCount()>0)
    {
        tblmodeldungcu.removeRow(0);
    }
    String sql = "select * from Dungcu where Tendungcu like N'%"+txttimkiemdungcu.getText()+"%'";
    try
    {
        rsdungcu = obj.executeSQL(sql);
        while(rsdungcu.next())
        {
            Vector v =new Vector();
            v.addElement(rsdungcu.getString("Madungcu"));
            v.addElement(rsdungcu.getString("Tendungcu"));
            v.addElement(rsdungcu.getString("Noisanxuat"));
            v.addElement(rsdungcu.getString("Gia"));
            v.addElement(rsdungcu.getString("Chucnang"));
            tblmodeldungcu.addRow(v);
        }
       tabdungcu.setModel(tblmodeldungcu);
       if(tblmodeldungcu.getRowCount() == 0)
       {
           JOptionPane.showMessageDialog(this,"Không tìm thấy dụng cụ !");
       }
    }
    catch(SQLException e)
    {
        e.printStackTrace();
    }
}//GEN-LAST:event_btntimkiemdungcuActionPerformed

private void cbbNguoihuongdanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbbNguoihuongdanActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cbbNguoihuongdanActionPerformed

private void txtdoanhthuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtdoanhthuActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtdoanhthuActionPerformed

public void loaddoanhthu(){
    connect obj = new connect();
    Connection con = obj.connect();
    
    String chiphi = "";
    int tong = 0;
    Date today = new Date();
    int thang;
    thang = today.getMonth()+0;
    
    String sql1 = "exec sp_Lop_GetByTop_Thang "+thang+"";
    try{
        rs = obj.executeSQL(sql1);
        while(rs.next())
        {
            String malop = rs.getString("Malop");
            String sql2 = "select Manguoihuongdan from Lop where Malop = '"+malop+"'";
            rslop = obj.executeSQL(sql2);
            while(rslop.next())
            {
                String mnhd = rslop.getString("Manguoihuongdan");
                String sql3 = "select Manoidung from Nguoihuongdan where Manguoihuongdan = '"+mnhd+"'";
                rsnguoihuongdan = obj.executeSQL(sql3);
                while(rsnguoihuongdan.next())
                {
                    String mand = rsnguoihuongdan.getString("Manoidung");
                    String sql4 = "select Chiphi from Noidungtap where Manoidung = '"+mand+"'";
                    rsnoidungtap = obj.executeSQL(sql4);
                    while(rsnoidungtap.next())
                    {
                        chiphi = rsnoidungtap.getString("Chiphi");
                    }
                }
            }
            String sql5 = "select * from Chitietlop where Malop = '"+malop+"'";
            rs1 = obj.executeSQL(sql5);
            while(rs1.next())
            {
                tong = tong + Integer.parseInt(chiphi.toString());
            }
        }
       txtdoanhthu.setText(""+tong);
    }
    catch(Exception e)
    {
        e.printStackTrace();
    }
    
}
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(GiaodienAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(GiaodienAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(GiaodienAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(GiaodienAdmin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new GiaodienAdmin().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnDkThanhvien;
    private javax.swing.JButton btnDkTimkiem;
    private javax.swing.JButton btnDkTimkiemthanhvien;
    private javax.swing.JButton btnNHDsua;
    private javax.swing.JButton btnNHDthem;
    private javax.swing.JButton btnNHDxoa;
    private javax.swing.JButton btnSualop;
    private javax.swing.JButton btnSuanoidung;
    private javax.swing.JButton btnThemlop;
    private javax.swing.JButton btnThemnoidung;
    private javax.swing.JButton btnXoalop;
    private javax.swing.JButton btnXoanoidung;
    private javax.swing.JButton btndcThem;
    private javax.swing.JButton btndcXoa;
    private javax.swing.JButton btnsuathanhvien;
    private javax.swing.JButton btnthemthanhvien;
    private javax.swing.JButton btntimkiemdungcu;
    private javax.swing.JButton btnxoathanhvien;
    private javax.swing.JComboBox cbbNDTtendungcu;
    private javax.swing.JComboBox cbbNHDcapdo;
    private javax.swing.JComboBox cbbNHDgioitinh;
    private javax.swing.JComboBox cbbNHDnoidung;
    private javax.swing.JComboBox cbbNguoihuongdan;
    private javax.swing.JComboBox cbbcapdo;
    private javax.swing.JComboBox cbbgioitinh;
    private com.toedter.calendar.JDateChooser cldLopNgaybatdau;
    private com.toedter.calendar.JDateChooser cldLopNgayketthuc;
    private com.toedter.calendar.JDateChooser cldNHDngaysinh;
    private com.toedter.calendar.JDateChooser cldngaysinh;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable jTable2;
    private javax.swing.JTable jTable3;
    private javax.swing.JTable tabDkLop;
    private javax.swing.JTable tabDkThanhvien;
    private javax.swing.JTable tabLop_Thanhvien;
    private javax.swing.JTable tabNguoihuongdan;
    private javax.swing.JTable tabdungcu;
    private javax.swing.JTable tabthanhvien;
    private javax.swing.JButton tbnNHDtimkiem;
    private javax.swing.JButton tbntimkiem;
    private javax.swing.JTextField txtChiphi;
    private javax.swing.JTextField txtDkTimkiemlop;
    private javax.swing.JTextField txtDkTimkiemthnahvien;
    private javax.swing.JTextField txtKhunggio;
    private javax.swing.JTextField txtMalop;
    private javax.swing.JTextField txtManoidung;
    private javax.swing.JTextField txtMota;
    private javax.swing.JTextField txtNHDdiachi;
    private javax.swing.JPasswordField txtNHDlaimatkhau;
    private javax.swing.JTextField txtNHDma;
    private javax.swing.JPasswordField txtNHDmatkhau;
    private javax.swing.JTextField txtNHDsdt;
    private javax.swing.JTextField txtNHDten;
    private javax.swing.JTextField txtNHDtendn;
    private javax.swing.JTextField txtNHDtimkiem;
    private javax.swing.JTextField txtNHDtrinhdo;
    private javax.swing.JTextField txtTenlop;
    private javax.swing.JTextField txtTennoidung;
    private javax.swing.JTextField txtdcChucnang;
    private javax.swing.JTextField txtdcGia;
    private javax.swing.JTextField txtdcMa;
    private javax.swing.JTextField txtdcNsx;
    private javax.swing.JTextField txtdcTen;
    private javax.swing.JTextField txtdiachi;
    private javax.swing.JTextField txtdoanhthu;
    private javax.swing.JPasswordField txtlaimatkhau;
    private javax.swing.JTextField txtmathanhvien;
    private javax.swing.JPasswordField txtmatkhau;
    private javax.swing.JTextField txtsdt;
    private javax.swing.JTextField txttendangnhap;
    private javax.swing.JTextField txttenthanhvien;
    private javax.swing.JTextField txttimkiem;
    private javax.swing.JTextField txttimkiemdungcu;
    // End of variables declaration//GEN-END:variables
}
